﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using DevExpress.Xpf.Docking;

namespace Agnes.Mainframe
{
    public class DocsCloseCmd
    {
        private static DocsCloseCmd _instance;

        /// <summary>
        /// 返回唯一实例
        /// </summary>
        public static DocsCloseCmd Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new DocsCloseCmd();
                }
                return _instance;
            }
        }

        private RoutedCommand _requery;

        /// <summary>
        /// 是否能执行
        /// </summary>
        public bool CanExcuted { get; set; }

        DocsCloseCmd()
        {
            CanExcuted = true;
            _requery = new RoutedCommand("Docs Close Cmd", typeof(DocsCloseCmd));
        }

        /// <summary>
        /// 文章编辑模式的路由命令
        /// </summary>
        public static RoutedCommand Requery
        {
            get
            {
                return Instance._requery;
            }
        }

        /// <summary>
        /// 执行代码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void Excuted(object sender, ExecutedRoutedEventArgs e)
        {
            DocumentPanel documentPanel = sender as DocumentPanel;


        }

        /// <summary>
        /// 判断是否能执行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void CanExcute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
        }
    }
}
